package net.dengzixu.java.homework.period20;

import java.util.StringJoiner;

/**
 * @author Deng Zixu <admin@dengzixu.com>
 */
public class Milk extends Goods {
    private double vipPrice;


    /**
     * Goods 商品
     *
     * @param unitPrice 单价
     * @param account   数量
     * @param vipPrice  会员价格
     */
    public Milk(double unitPrice, long account, double vipPrice) {
        super(unitPrice, account);
        this.vipPrice = vipPrice;
    }

    public double getVipPrice() {
        return vipPrice;
    }

    public void setVipPrice(double vipPrice) {
        this.vipPrice = vipPrice;
    }

    @Override
    public String toString() {
        return "Milk{" +
                "unitPrice=" + super.getUnitPrice() +
                ", account=" + super.getAccount() +
                ", vipPrice=" + vipPrice +
                "} ";
    }
}
